package three.extthread;

import java.util.Date;

import three.ext.Tools;

public class ThreadB extends Thread {
	
	@Override
	public void run() {
		
		try {
			for (int i = 0; i <20; i++) {
				if (Tools.t1.get()==null) {
					Tools.t1.set(new Date());
				}
				System.out.println("B " + Tools.t1.get());
				Thread.sleep(100);
			}
			
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		
	}
	
}
